var { initObj, formatObj } = require('../libs/common');

var init = function (data) {
    return initObj(mod, data);
}

var format = function (data) {
    return formatObj(mod, data);
}

// 实名认证记录表
var mod = {
    pcode: {
        name: '关联员工code',
        type: 'string',
        length: 12
    },
    authtype: {
        name: '认证方式 如：居民身份证、护照',
        type: 'string',
        length: 250
    },
    nickname: {
        name: '关联用户nickname',
        type: 'string',
        length: 50
    },
    name: {
        name: '姓名',
        type: 'string',
        length: 50
    },
    idcard: {
        name: '证件号码',
        type: 'string',
        length: 250
    },
    img: {
        name: '正面照片',
        type: 'string',
        length: 250
    },
    img_back: {
        name: '反面照片',
        type: 'string',
        length: 250
    },
    ispass: {
        name: '是否通过',// 0:审核不通过 1：通过 9：未审核
        type: 'number',
        default: 9
    },
    commit: {
        name: '审批人意见',
        type: 'string',
        length: 250
    },
    createtime: {
        name: '创建时间',
        type: 'date',
        default: new Date()
    },
    updatetime: {
        name: '更新时间',
        type: 'date',
        default: new Date()
    },
    audittime: {
        name: '审批时间',
        type: 'date'
    },
    audithistory:{
        name: '审批历史',
        type: 'string',
        length: 5000
    }
};

module.exports = {
    init,
    format
};